#!/usr/bin/env python3
# coding: utf-8

#import pkg1.mod1.UsefulClass as _UsefulClass # No module named UsefulClass
from pkg1.mod1 import UsefulClass as _UsefulClass
import pkg2 as P2
from pkg2012.mod2013 import FrogClass as Frog


class SuperDuperUC(_UsefulClass):
    """
    hurp drup
    """

    def do_it(self):
        print("{0}: I'm doing it!".format(self.name))

    def newmethod(self, x=None):
        print('newmethod:', 'x is {!r}'.format(x) if x else '')


if __name__ == "__main__":
    obj = SuperDuperUC('johnny', 19, 'm', 'mind')
    print('obj.name =', obj.name)
    print('len(obj) =', len(obj))
    obj.do_it()
    obj.oldmethod()
    obj.newmethod()
    obj.newmethod(obj)
    print()
    print('-' * 79)
    print()
    frog = Frog('bob')
    frog.say("i'll bite your fingers off")
    frog.bite('fingers')
    frog.chow()
    frog.swallow()
    frog.say('how do you like that, huh?')
    print()
    print('-' * 79)
    print()
    print('asdf', 2345, 'rail')
    print(P2.util.rev('asdf'), P2.util.rev(2345), P2.misc.rot13('rail'))
